package com.engine4cloud.tdf.supervision.dto.query;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "行政区划电子围栏-请求对象")
public class AreaFenceQueryDTO implements Serializable {
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "地区编码", example = "460000")
    private String code;

    @Schema(description = "父地区编码，获取省份列表传8600", example = "86000")
    @NotBlank(message = "父地区编码不能为空")
    private String pcode;

    @Schema(description = "地区名称", example = "海南省")
    private String name;

    public AreaFenceQueryDTO(String code) {
        this.code = code;
    }
}
